package _01_动态数组;

public class _278_第一个错误的版本 {


    public int firstBadVersion(int n) {
        int begin = 1;
        int end = n;

        while (begin < end) {
            int mid = begin + ((end - begin) >> 1);
            if (isBadVersion(mid)) {
                end = mid;
            } else {
                begin = mid + 1;
            }
        }
        return begin;
    }

    private boolean isBadVersion(int mid) {
        return false;
    }


}
